package com.tyqx.hashchainbiz.service.impl;

import com.tyqx.hashchainbean.module.UserNameAuthorityQuery;
import com.tyqx.hashchainbean.vo.UserNameAuthorityQueryVO;
import com.tyqx.hashchainbiz.service.UserNameAuthorityQueryService;
import com.tyqx.hashchaindao.mapper.UserNameAuthorityQueryMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userNameAuthorityQueryService")
public class UserNameAuthorityQueryServiceImpl implements UserNameAuthorityQueryService {

    @Resource
    private UserNameAuthorityQueryMapper userNameAuthorityQueryMapper;

    @Override
    public Integer addUserNameAuthorityQuery(UserNameAuthorityQuery userNameAuthorityQuery) {
        return userNameAuthorityQueryMapper.addUserNameAuthorityQuery(userNameAuthorityQuery);
    }

    @Override
    public Integer deleteUserNameAuthorityQuery(Integer id) {
        return userNameAuthorityQueryMapper.deleteUserNameAuthorityQuery(id);
    }

    @Override
    public List<Integer> selectIdByUserNameAndGrantUserName(String userName, String grantUserName, String grantType) {
        return userNameAuthorityQueryMapper.selectIdByUserNameAndGrantUserName(userName, grantUserName,grantType);
    }

    @Override
    public List<UserNameAuthorityQueryVO> queryUserNameAuthorityQueryByUserName(String userName) {
        return userNameAuthorityQueryMapper.queryUserNameAuthorityQueryByUserName(userName);
    }
}
